package com.lovo.roomProject.system.service.impl;

import com.lovo.roomProject.pojo.CutPageBean;
import com.lovo.roomProject.pojo.UserDO;
import com.lovo.roomProject.system.dao.UserDAO;
import com.lovo.roomProject.system.dao.impl.UserDAOImpl;
import com.lovo.roomProject.system.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
  private UserDAO userDAO =new UserDAOImpl();
    @Override
    public List listUser() {
        return userDAO.listUser();
    }

    @Override
    public CutPageBean listUserByPage(int current) {
        return userDAO.listUserByPage(current);
    }

    @Override
    public UserDO getUserById(int id) {
        return userDAO.getUserById(id);
    }

    @Override
    public UserDO getUserByNameAndPassword(String userName, String password) {
        return userDAO.getUserByNameAndPassword(userName,password);
    }

    @Override
    public void insert(UserDO userDO) {
        userDAO.insert(userDO);
    }

    @Override
    public void delete(int id) {
        userDAO.delete(id);
    }

    @Override
    public void update(UserDO userDO) {
        userDAO.update(userDO);
    }
}
